<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        for (let i=0;i<5;i++){
            document.writeln(i);
        }
        document.write("<br/>");
        let arr = [1,2,3,4,5];
        let number = window.prompt("请输入一个数字");
        // document.write(number);
        let existsFlag =false;
        for (let i=0;i<arr.length;i++) {
            if (arr[i] == number) {
                existsFlag = true;
                break;
            }
        }
        if (existsFlag){
            document.write(number + "存在于数组中")
        }else {
            document.write(number + "不存在于数组中")
        }
    </script>
</head>
<body>

</body>
</html>